package ThreadDemo;

public class thread {

public static void main(String[] args) throws InterruptedException {
       // 创建两个线程
        Thread t1 = new ThreadEX();
        Thread t2 = new ThreadEX();
        t1.setName("线程A");
        t2.setName("线程B");
        // 开启两个线程
        t1.start();
//        t2.start();
//        t1.join();
//        t2.start();
        //作用是让线程的进行尽可能的均匀一点
        for (int i = 0; i < 1000; i++) {//
                System.out.println("main线程"+i);
        }
    }
}


